<?php
    //Referencias
    include_once 'Model/M_Noticia.php';
    
    $noticia = new M_Noticia();
    $lista = $noticia->buscarNoticias();
    
 mysql_connect("localhost", "root", "mysql");
mysql_select_db("slider");

$rs = mysql_query("select * from slider");
?>


<!DOCTYPE html>
<html lang="es">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="View/css/sge_web.css"/>
            <link rel='stylesheet' id='style-css'  href='View/css/diapo.css' type='text/css' media='all'> 
        <script type='text/javascript' src='View/js/jquery.min.js'></script>
        <script type='text/javascript' src='View/js/jquery.mobile-1.0rc2.customized.min.js'></script><!--<![endif]-->
        <script type='text/javascript' src='View/js/jquery.easing.1.3.js'></script> 
        <script type='text/javascript' src='View/js/jquery.hoverIntent.minified.js'></script> 
        <script type='text/javascript' src='View/js/diapo.js'></script> 

        <script>
            $(function(){
                $('.pix_diapo').diapo();
            });

        </script>
        <style>
            #div-linea-vertical
            {
                border-left: 1px solid #CCC;
                width: 1px;
                height: 60px;
            }
        </style>
    </head>
    <body style="background: white;">
        <div style="position: relative; width: 950px; height:auto; margin: auto; margin-top: 10px; padding-right: 10px;">
            <div id="cabecera">
                <div id="logo">
                    <a href="index.php">    <img id="logo1" src="View/images/logito.jpg" style="width:330px; height:100px;" /></a>
                </div>
                <ul class="menu">
                    <li class="active"><a href="index.php" id="primero">Inicio</a></li>
                    <li> <a href="PE_Nosotros.php">Quienes</a></li>
                    <li><a href="PE_Alumnos.php">Alumnos</a></li>
                    <li><a href="#">Docentes</a></li>
                    <li><a href="#" id="ultimo">Eventos</a></li>
                </ul>
            </div>  
            <div id="cuerpo">
  
          
                <div class="pix_diapo"><?
                      while ($row = mysql_fetch_array($rs)) {

                $imagenx = $row['imagen'];
                $descripcionx = $row['descripcion'];
    
                ?>

                    <div data-thumb="View/images/portada/<?php echo $imagenx; ?>" width="50" height="50" border="0">
                        <img src="View/images/portada/<?php echo $imagenx; ?>" width="960" height="400" border="0">
                        <div class="caption elemHover fromLeft">
                        <?  echo   $descripcionx; ?>
                        </div>
                    </div>
  <?}?>

                </div><!-- #pix_diapo -->

            </div>

            <div id="bus">

                <input type="text" name="txtbuscar" style="width:330px; " placeholder="Busqueda Personalizada"/>
                <input type="submit" value="Buscar" />
                <div id="logo2">&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="#"> <img title="Youtube" src="View/images/youtube.png" style="width:24px; height:24px;" /></a>
                    <a href="#">   <img title="Twitter"  src="View/images/twitter.png" style="width:24px; height:24px;" /></a>
                    <a href="https://www.facebook.com/ivp.secundaria?fref=ts"  target="_blank"><img  title="Facebook" src="View/images/facebook.png" style="width:24px; height:24px;" /></a>

                    <a href="View/V_Login.php" ><img  title="Ingresar al Sistema" src="View/images/login.png" style=" height:27px;  margin-left: 360px;"/></a>
                </div>
            </div>
            <div id="noticia">
                <table>
                    <tr>
                        <td>
                            <label style="font-style: italic; font-weight: bold; font-size: 35px; color: #9C999D">NOTICIAS >> </label>
                        </td>
                        <td>
                            <table>
                                <tbody>
                                    <tr>
                                        <?php
                                        if(count($lista)>0)
                                        {
                                            for($i=0;$i<(count($lista));$i++) 
                                            {
                                            ?>
                                            <td>
                                                <table>
                                                    <tr>
                                                        <td><img height="60" width="60" src="View/images/Noticias/<? echo ($lista[$i]['vc_ruta_imagen']); ?>" ></td>
                                                        <td width="100"><p style="font-size: 12px"><b><a style="text-decoration: none" href="V_NoticiaDetalle.php?idNoticia=<? echo ($lista[$i]['id_noticia']); ?>"><? echo ($lista[$i]['vc_titulo']); ?></a></b></p></td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <?php
                                            if(!($i==(count($lista)-1)))
                                            {
                                                ?>
                                            <td>
                                                <div id="div-linea-vertical"></div>
                                            </td>
                                                <?
                                            }                                
                                            }
                                        }
                                        else
                                        {
                                            echo ("<td>No existen registros<td>");
                                        }
                                        ?>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
            </div> 

            <footer id="pie"> 
                <hr style="width: auto; position: relative; top: 5px;">
                <p align="center">Copyright © I.E.P. Virgen de la Puerta 2013<br/>
                    Rafael Sanzio 1102, La Noria - Trujillo | Correo electronico: ivpsecundaria@hotmail.com | Telefono: 044-213657 <br/>
                    Versión 1.0 | Todos los derechos reservados | Optimizado para:<img   src="View/images/firefox.png" style="width:20px; height:20px;" /><img   src="View/images/chrome.png" style="width:20px; height:20px;" /><br>

                    <br>

                </p>
            </footer>  

        </div>

    </body>      

</html>
